Skip to content

feat(generated): update generated SDK from spec changes#242

Closed
workos-sdk-automation[bot] wants to merge 1 commit intomainfrom
oagen/spec-update-9998aeaecba4f3635f8beda2e3248f5a24b7e93f
Closed

feat(generated): update generated SDK from spec changes#242
workos-sdk-automation[bot] wants to merge 1 commit intomainfrom
oagen/spec-update-9998aeaecba4f3635f8beda2e3248f5a24b7e93f

Conversation

@workos-sdk-automation
Copy link
Copy Markdown
Contributor

Summary

update generated SDK from spec changes

Spec Diff

  • Added: | Removed: | Modified: | Breaking:

Triggered by openapi-spec commit: 9998aeaecba4f3635f8beda2e3248f5a24b7e93f

@workos-sdk-automation workos-sdk-automation Bot requested review from a team as code owners April 27, 2026 21:27
@workos-sdk-automation workos-sdk-automation Bot added the autogenerated Autogenerated code or content label Apr 27, 2026
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 27, 2026

Greptile Summary

This auto-generated PR syncs the .NET SDK to OpenAPI spec changes: adds new GroupsService and UserManagementOrganizationMembershipGroupsService, introduces WaitlistUser entities and events, extends SSOProvider/UserManagementAuthenticationProvider enums with new OAuth providers, renames several AuthorizationService methods and AdminPortalOptions.AdminEmailsItContactEmails, and adds RoleSlug to Invitation. The most significant concern is that EventSchema has been reduced to an empty class while EventsService still returns WorkOSList<EventSchema>, meaning all event data (id, type, payload, timestamps) becomes inaccessible to callers.

Confidence Score: 3/5

Not safe to merge as-is — EventsService returns an empty EventSchema class, silently dropping all event data for existing consumers.

A P1 finding is present: EventSchema was gutted to an empty class while EventsService.ListAsync still returns WorkOSList, making all event payload data inaccessible. The rest of the changes (new services, enum additions, method renames) look correct.

src/WorkOS.net/Entities/EventSchema.cs and src/WorkOS.net/Services/Events/EventsService.cs — EventSchema is now empty but EventsService still uses it as the list item type.

Important Files Changed

Filename Overview
src/WorkOS.net/Entities/EventSchema.cs All EventSchema properties and helper methods removed, leaving an empty class; EventsService still returns WorkOSList making all event data inaccessible.
src/WorkOS.net/Entities/FlagDeleted.cs Context property typed as FlagCreatedContext — semantically misleading for a delete event.
src/WorkOS.net/Services/Groups/GroupsService.cs New service with full CRUD plus membership management for groups; auto-generated, looks correct.
src/WorkOS.net/Services/Authorization/AuthorizationService.cs Multiple breaking renames from spec changes; logic is consistent and tests updated accordingly.
src/WorkOS.net/Services/AdminPortal/_interfaces/AdminPortalOptions.cs Breaking rename: AdminEmails → ItContactEmails; test fixture retains stale admin_emails field.
src/WorkOS.net/Entities/WaitlistUser.cs New WaitlistUser entity with proper enum/serialization attributes; looks correct.
src/WorkOS.net/Services/UserManagementOrganizationMembershipGroups/UserManagementOrganizationMembershipGroupsService.cs New service for listing groups by organization membership; auto-generated, straightforward.
src/WorkOS.net/Enums/SSOProvider.cs Added new OAuth provider values (Bitbucket, GitLab, Intuit, LinkedIn, Salesforce, Slack, Vercel, Xero); additive change, no regressions.
test/WorkOSTests/testdata/generate_link.json Stale admin_emails field left in fixture after the AdminEmails→ItContactEmails rename; the field is now unmapped and silently ignored.

Reviews (1): Last reviewed commit: "fix(generated): update generated SDK fro..." | Re-trigger Greptile

Comment on lines 7 to 9
public class EventSchema
{

/// <summary>Distinguishes the Event object.</summary>
public string Object { get; internal set; } = "event";

/// <summary>Unique identifier for the Event.</summary>
public string Id { get; set; } = default!;

/// <summary>The type of event that occurred.</summary>
public string Event { get; set; } = default!;

/// <summary>The event payload.</summary>
public Dictionary<string, object> Data { get; set; } = default!;

/// <summary>An ISO 8601 timestamp.</summary>
public DateTimeOffset CreatedAt { get; set; }

/// <summary>Additional context about the event.</summary>
public Dictionary<string, object>? Context { get; set; }

/// <summary>
/// Typed accessor for <see cref="Data"/>. Returns the value stored under
/// <paramref name="key"/> coerced to <typeparamref name="T"/>, or the default
/// value when the key is missing or the value is not convertible.
/// </summary>
/// <typeparam name="T">Expected value type.</typeparam>
/// <param name="key">The key to look up.</param>
public T? GetDataAttribute<T>(string key)
{
if (this.Data == null)
{
return default;
}

if (!this.Data.TryGetValue(key, out var value))
{
return default;
}

if (value is T typed)
{
return typed;
}

if (value is Newtonsoft.Json.Linq.JToken token)
{
return token.ToObject<T>();
}

if (value is System.Text.Json.JsonElement element)
{
return System.Text.Json.JsonSerializer.Deserialize<T>(element.GetRawText());
}

return default;
}

/// <summary>
/// Typed accessor for <see cref="Context"/>. Returns the value stored under
/// <paramref name="key"/> coerced to <typeparamref name="T"/>, or the default
/// value when the key is missing or the value is not convertible.
/// </summary>
/// <typeparam name="T">Expected value type.</typeparam>
/// <param name="key">The key to look up.</param>
public T? GetContextAttribute<T>(string key)
{
if (this.Context == null)
{
return default;
}

if (!this.Context.TryGetValue(key, out var value))
{
return default;
}

if (value is T typed)
{
return typed;
}

if (value is Newtonsoft.Json.Linq.JToken token)
{
return token.ToObject<T>();
}

if (value is System.Text.Json.JsonElement element)
{
return System.Text.Json.JsonSerializer.Deserialize<T>(element.GetRawText());
}

return default;
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 EventSchema gutted — EventsService now returns empty objects

All properties (Id, Event, Data, CreatedAt, Context) and the helper methods GetDataAttribute<T> / GetContextAttribute<T> have been removed, leaving EventSchema as an empty class. EventsService.ListAsync still returns WorkOSList<EventSchema>, so callers receive a list of empty objects with no data accessible at all. Any code consuming event payloads (event type, payload data, timestamps) will break silently at runtime.


/// <summary>Additional context about the event.</summary>
public EventSchemaContext Context { get; set; } = default!;
public FlagCreatedContext Context { get; set; } = default!;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Misleading context type on FlagDeleted

FlagDeleted.Context is typed as FlagCreatedContext, which is semantically incorrect for a delete event. If FlagCreated and FlagDeleted share the same context shape, a neutral name such as FlagEventContext would be clearer; alternatively, introduce a separate FlagDeletedContext type.

Comment on lines 15 to +17
"admin_emails": [
"admin@example.com"
],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Stale admin_emails field in fixture

AdminEmails was removed from GenerateLink and AdminPortalOptions in this PR (renamed to ItContactEmails). The admin_emails key remaining here no longer maps to any property and will be silently ignored during deserialization. Remove it to keep the fixture accurate.

@gjtorikian gjtorikian changed the title fix(generated): update generated SDK from spec changes feat(generated): update generated SDK from spec changes Apr 27, 2026
@gjtorikian gjtorikian closed this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autogenerated Autogenerated code or content

Development

Successfully merging this pull request may close these issues.

1 participant